import { ObjStrKey } from "../types/base"

const api: ObjStrKey = {
    // 测试
    reg: 'post:/users',
    login: 'post:/users/login',
    // 登录部分
    signup: 'post:/signup',
    signin: 'post:/signin',
    signout: 'get:/signout',
    // 分类部分
    createCategory: 'post:/category/create/{userId}',
    getCategories: 'get:/categories',
    getCategoryById: 'get:/category/{categoryId}',
    updateCategoryById: 'put:/category/{categoryId}/{userId}',
    delCategoryById: 'delete:/category/{categoryId}/{userId}',
    // 產品部分
    createProduct: 'post:/product/create/{userId}',
    getProductById: 'get:/product/{productId}',
    delProductById: 'delete:/product/{productId}/{userId}',
    updateProductById: 'put:/product/{productId}/{userId}',
    getProductList: 'get:/products',
    getProductsById: 'get:/products/related/{productId}',
    getCategoryByProductList: 'get:/products/categories',
    getProductListByFilter: 'post:/products/filter',
    getProductPhotoById: 'get:/product/photo/{productId}',
    getProductsInSearch: 'get:/products/search',
    // 用户部分
    getUserById: 'get:/user/{userId}',
    updateUserById: 'put:/user/{userId}',
    getUserOrderById: 'get:/orders/by/user/{userId}',
    // alipay
    alipay: 'post:/alipay',
    // 订单部分
    getOrderList: 'get:/order/list/{userId}',
    updateOrderStatus: 'put:/order/status/{userId}',

}
export default api
